﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:element name="Catalog">
		<xs:complexType>
			<xs:sequence>
				<xs:element maxOccurs="unbounded" name="Weapon">
					<xs:complexType>
						<xs:attribute name="Name" type="xs:string" use="required" />
						<xs:attribute name="Heat" type="xs:integer" use="required" />
						<xs:attribute name="Damage" type="xs:string" use="required" />
						<xs:attribute name="MinRange" type="xs:integer" use="optional" />
						<xs:attribute name="ShortRange" type="xs:integer" use="required" />
						<xs:attribute name="MediumRange" type="xs:integer" use="required" />
						<xs:attribute name="LongRange" type="xs:integer" use="required" />
						<xs:attribute name="Weight" type="xs:decimal" use="required" />
						<xs:attribute name="Size" type="xs:integer" use="required" />
						<xs:attribute name="Ammo" type="xs:string" use="optional" />
					</xs:complexType>
				</xs:element>

				<xs:element name="Mech" maxOccurs="unbounded">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="Equipment">
								<xs:complexType>

									<xs:sequence>
										<xs:choice maxOccurs="unbounded">
											<xs:element maxOccurs="unbounded" name="Weapon">
												<xs:complexType>
													<xs:attribute name="Name" type="xs:string" use="required" />
													<xs:attribute name="Location" type="xs:string" use="required" />
												</xs:complexType>
											</xs:element>
											<xs:element maxOccurs="unbounded" name="Ammo">
												<xs:complexType>
													<xs:attribute name="Name" type="xs:string" use="required" />
													<xs:attribute name="Quantity" type="xs:integer" use="required" />
													<xs:attribute name="Location" type="xs:string" use="required" />
												</xs:complexType>
											</xs:element>
										</xs:choice>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
						<xs:attribute name="Name" type="xs:string" use="required" />
						<xs:attribute name="Callsign" type="xs:string" use="required" />
					</xs:complexType>
				</xs:element>

			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>